import { reqsecklist } from '../../http/api'
let state = {
    list: [],
};
let getters = {
    list(state) {
        return state.list;
    }
};
let mutations = {
    changeList(state, list) {
        state.list = list;
    }
};
let actions = {
    async getList({ commit }) {
        let { data: res } = await reqsecklist();
        if (res.code == 200) {
            let arr = res.list ? res.list : []
            commit('changeList', arr);
        }

    }
};
export default {
    state,
    actions,
    mutations,
    getters,
    namespaced: true
}